@import './base.css';

/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #333;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background-color: #f5f5f5;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background-color: #c0c4cc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #909399;
}

/* 覆盖element-plus的一些样式 */
.el-table .cell {
  white-space: nowrap;
}

.el-pagination {
  margin-top: 15px;
  justify-content: flex-end;
}

/* 页面通用样式 */
.page-container {
  padding: 20px;
}

.page-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
}

.search-form {
  margin-bottom: 20px;
}

.operation-container {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 修正flex布局在某些element-plus组件中的问题 */
.el-select,
.el-date-editor.el-input,
.el-date-editor.el-input__wrapper,
.el-cascader {
  width: 100%;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .el-form-item {
    margin-bottom: 12px;
  }
  
  .el-dialog {
    width: 95% !important;
  }
}

/* 管理系统布局 */
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

a,
.green {
  text-decoration: none;
  color: hsla(160, 100%, 37%, 1);
  transition: 0.4s;
  padding: 3px;
}

@media (hover: hover) {
  a:hover {
    background-color: hsla(160, 100%, 37%, 0.2);
  }
}

@media (min-width: 1024px) {
  body {
    display: flex;
    place-items: center;
  }

  #app {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0 2rem;
  }
}
